//
//  FoodDetailNewTVC.h
//  FaceCard
//
//  Created by 瞿伦平 on 2016/10/17.
//  Copyright © 2016年 瞿伦平. All rights reserved.
//

#import "QUScrollVC.h"
#import "APIClient.h"
#import "WPHotspotLabel.h"
#import "QUTableView.h"
#import "HCSStarRatingView.h"
#import "ImagePlayerView.h"

/** 偏移方法操作枚举 */
typedef enum : int {
    up   = 1,        //固定在navigation上面
    buttom     = 2,        // 固定在navigation下面
} headerMenuShowType;  //


//static const float kZEHeaderHight = 300; //头部高度
static const float kZEHeaderBaseInfoHight = 300; //头部店铺基本信息高度
static const float kZEFooterHight = 50; //底部部高度
static const float kZEClassTableViewWidth = 80; //

static const float kSegBtnWidth = 50; //商品＆评论高度

static const float kShopCarListView_HeaderViewHeight = 40; //购物车头部高度
static const float kShopCarListView_CellViewHeight = 40; //购物车cell高度
//static const float kShopCarListView_BottomViewHeight = 80; //
#define kShopCarListView_MaxHeight       (DEVICE_Height * 0.5)



//购物车底部显示view
@interface FoodBottomView : UIView
@property(nonatomic,strong) UILabel *moneyLable;
@property(nonatomic,strong) UILabel *moneyShowWhenShopCarShowLable;
@property(nonatomic,strong) UIButton *cartLogoBtn;
@property(nonatomic,strong) UIButton *buyBtn;
-(void)reloadWithTotalMoney:(float)money shippingFee:(float)shippingFee goodsCount:(int)count;
-(void)isShowShopCarView:(BOOL)isShow;
@end


//店铺信息头部
@interface FoodHeaderView : UIView
@property(nonatomic,strong) ImagePlayerView *shopImgLunView;
@property(nonatomic,strong) UILabel *shopNameLable;
@property(nonatomic,strong) UILabel *shopDesLable;
@property(nonatomic,strong) UILabel *shopAddressLable;
@property(nonatomic,strong) HCSStarRatingView *starView;
@property(nonatomic,strong) UILabel *shopOrderLable;
@end


//购物车顶部视图
@interface FoodShopCarHeaderView : UIView
@property(nonatomic,strong) UIButton *clearBtn;
@end


//购物车视图
@interface FoodShopCarView : UIView
@property(nonatomic,strong) UITableView *   mShopCarListView;;
@property(nonatomic,strong) FoodShopCarHeaderView *mShopCarListHeaderView;
@end


//购物车与底部状态视图
@interface FoodShopCarAndBottemView : UIView <UITableViewDelegate, UITableViewDataSource>
@property(nonatomic,strong) FoodShopCarView *       mShopCarView;
@property(nonatomic,strong) FoodBottomView *        bottomView;

@property(nonatomic,strong) NSMutableArray *        selectArr; //购物车数据
@property(nonatomic,assign) float                   total_money_fee;//配送费用
@property(nonatomic,assign) float                   total_money;//总金额
@property(nonatomic,assign) float                   starting_price;//起送价

@property (nonatomic, copy) void (^successClearnCallBack)();
@property (nonatomic, copy) void (^successEditNumCallBack)(FoodGoods* item);

-(void)reSetCartArr:(NSArray *)arr;
-(NSMutableArray *)getGoodsInfoArrWithShopId:(NSString *)shopId;
-(int)countFromCartDicWithId:(NSString *)iD;
-(void)setCartArrWithItem:(FoodGoods *)item;
-(void)setShippingFeeWithMoney:(float)money;
- (void)hiddenShopList;
-(void)updateShopCarUICons;
- (void)showShopList;
- (void)initShopCarView;

@end



//正文视图
@interface FoodContentView : UIView<UIScrollViewDelegate>
@property(nonatomic,strong) FoodHeaderView *headerView; //顶部店铺信息view

@property(nonatomic,strong) UIButton *              segBtn0;
@property(nonatomic,strong) UIButton *              segBtn1;
@property(nonatomic,strong) UIView *                segLineView;
@property(nonatomic,strong) UIView *              segView;

@property(nonatomic,strong) UIScrollView*           scrollView;
@property(nonatomic,strong) UIView*                 contentView;

@property(nonatomic,strong) UITableView*            classTableView; //商品分类列表view
@property(nonatomic,strong) QUTableView*            tableView;  //商品列表view
@property(nonatomic,strong) QUTableView*            commentTableView;  //评价列表view
@property(nonatomic,strong) UIView *                middleView;

//@property(nonatomic,strong) FoodBottomView*         bottomView;  //底部购买view
//
//@property(nonatomic,strong) FoodShopCarView *        mShopCarView;  //购物车view

@property(nonatomic,strong) FoodShopCarAndBottemView* cartView; //购物车view


@property (nonatomic, strong) NSMutableArray *titlesButtonArray;
@property (nonatomic, strong) UIButton *currentTitleButton;
@end



@interface FoodDetailNewTVC : QUVC

@property (nonatomic,copy)NSString *merid;//商家id

@property (nonatomic,copy)NSString *name;//商家名称

@property(nonatomic,strong) Shop *baseItem;

@property(nonatomic,strong) NSString *needLinkToGoodsId; //需要链接显示的对应商品id


@property(nonatomic,assign)CLLocationCoordinate2D locationCoorder;//jingweidu
@end
